/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.siminfo;

/**
 * APN流量告警请求接收
 *
 * @author zhanlele
 * @date 20200329 18:01:49
 * @modify 20200329 zhanlele v1.1.2 创建
 * @since v1.1.2
 */
public class SimApnGprsAlarmDTO {
    /**
     * msisdns 物联卡号
     */
    private String msisdns;
    /**
     * operType 操作类型
     */
    private String operType;
    /**
     * apnName apn名称
     */
    private String apnName;
    /**
     * apnType apn类型
     */
    private String apnType;
    /**
     * level1 告警阈值
     */
    private String level1;
    /**
     * level2 告警阈值
     */
    private String level2;
    /**
     * level3 告警阈值
     */
    private String level3;

    public String getMsisdns() {
        return msisdns;
    }

    public void setMsisdns(String msisdns) {
        this.msisdns = msisdns;
    }

    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    public String getApnName() {
        return apnName;
    }

    public void setApnName(String apnName) {
        this.apnName = apnName;
    }

    public String getApnType() {
        return apnType;
    }

    public void setApnType(String apnType) {
        this.apnType = apnType;
    }

    public String getLevel1() {
        return level1;
    }

    public void setLevel1(String level1) {
        this.level1 = level1;
    }

    public String getLevel2() {
        return level2;
    }

    public void setLevel2(String level2) {
        this.level2 = level2;
    }

    public String getLevel3() {
        return level3;
    }

    public void setLevel3(String level3) {
        this.level3 = level3;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("物联卡号:").append(msisdns).append(",");
        stringBuilder.append("APN名称:").append(apnName).append(",");
        if ("0".equals(apnType)) {
            stringBuilder.append("APN类型:").append("通用").append(",");
        } else if ("1".equals(apnType)) {
            stringBuilder.append("APN类型:").append("专用").append(",");
        }
        if ("0".equals(operType)) {
            stringBuilder.append("操作类型:").append("新增").append(",");
            stringBuilder.append("流量阈值1(单位：MB):").append(level1).append(",");
            stringBuilder.append("流量阈值2(单位：MB):").append(level2).append(",");
            stringBuilder.append("流量阈值3(单位：MB):").append(level3);
        } else if ("1".equals(operType)) {
            stringBuilder.append("操作类型:").append("取消");
        }

        return stringBuilder.toString();
    }
}
